<template>
  <div>
    <Steps :current="current">
      <Step title="公司信息"></Step>
      <Step title="步骤2"></Step>
      <Step title="步骤3"></Step>
      <Step title="步骤4"></Step>
    </Steps>
    <router-view>

    </router-view>
    <!--<router-link :to="{name:'customerDetailsStep'}"><Button type="success" @click="next();postData()">下一步</Button></router-link>-->

  </div>
</template>
<script>
  export default {
    data () {
      return {
        current: this.$route.params.current,
      }
    },
    methods: {
      next () {
        //应该是每点一下，路由改变
        if (this.current == 3) {
          this.current = 0;
        } else {
          this.current += 1;
        }
      },
      //axios请求demo
      postData(){
        this.$http.post('/user',{
         //这里面的数据应该获取gsInfo里面的formData对象
        }).then(function (response) {
          console.log('请求成功');
        }).catch(function (error) {
          console.log('失败了');
        })
      },
      step(){
        console.log(this.$route.params.current);
      }
    }
  }
</script>
